ちょくちょく使うのでメモ
ekidd/rust-musl-builder
ca-certificates
のインストール。以下の場合はbuilderイメージですでにあるものを利用
FROM ekidd/rust-musl-builder:stable as builder
# defined in ekidd/rust-musl-builder
# WORKDIR /home/rust/src
ADD . .
RUN cargo build --release --target x86_64-unknown-linux-musl
FROM scratch as runner
COPY /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY /home/rust/src/target/x86_64-unknown-linux-musl/release/app /usr/local/bin/app
ENTRYPOINT [ "app" ]